package com.chandra.pos.customer.model;

import com.chandra.pos.customer.dao.entity.CustomerEntity;
import org.springframework.util.StringUtils;

/**
 * Created by Admin on 8/15/14.
 */
public class CustomerModel extends CustomerEntity {


    public String getName() {
       StringBuilder nameStr=new StringBuilder();

        if(!StringUtils.isEmpty(this.getFirstName()))
            nameStr.append(getFirstName());

        if(!StringUtils.isEmpty(this.getMiddleName()))
            nameStr.append(getMiddleName());

        if(!StringUtils.isEmpty(this.getLastName()))
            nameStr.append(getLastName());


        return nameStr.toString();
    }

}
